#include "Breathe.h"

#include "Device.hpp"

Breathe::Breathe() {
    std::cout << "Breathe constructor" << std::endl;
    generateData();
}

Breathe::~Breathe() {
    std::cout << "Breathe destructor" << std::endl;
}

std::vector<double> Breathe::getData() const noexcept {
    return m_data;
}

void Breathe::loadHandbandData(Headband &headband) {
    m_headband = headband;
}

void Breathe::printHeadbandData() {
    std::cout << "Headband data: " << std::endl;
    for (auto data : m_headband.getData()) {
        std::cout << data << " ";
    }
    std::cout << std::endl;
}

void Breathe::loadParent(Device *device) {
    m_device = device;
    m_headband = device->getHeadband();
}

void Breathe::printHeadbandData2() {
    std::cout << "Headband data2: " << std::endl;
    for (auto data : m_device->getHeadband().getData()) {
        std::cout << data << " ";
    }
    std::cout << std::endl;
}

void Breathe::generateData() {
    for (int i = 0; i < 10; i++) {
        m_data.push_back(i * 3);
    }
}